package com.leon.learnenginespace.drools.dao;

import com.leon.learnenginespace.drools.pojo.TDrlNRuleBindColumnConfig;
import com.leon.learnenginespace.drools.pojo.TDrlNSceneRuleBindConfig;
import com.leon.learnenginespace.drools.pojo.TDrlNversion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @description: 规则持久层接口
 * @author: WT
 * @date: 2024/3/31 18:26
 * @Version 1.0
 **/

@Mapper
public interface GeneralRulesMapper {
    /**
     * 查询场景下配置的参数
     */
    List<TDrlNRuleBindColumnConfig> queryRuleColumn(@Param("sceneCode") String sceneCode);


    /**
     * 查询场景下的规则  //根据场景加载所有的规则 T_DRL_SCENE_RULE_BIND_CONFIG
     */
    List<TDrlNSceneRuleBindConfig> querySceneCodeRule (@Param("sceneCode") String sceneCode);

    /**
     * 热加载版本
     */
    @Select("select rule_type,version from t_drl_nversion")
    List<TDrlNversion> selectVersion();
}